*{
  padding: 0;
  margin: 0;
}

body{
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  perspective: 600px;
  background: #000;
  .card{
    width: 600px;
    height: 400px;
    border-radius: 30px;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    &:hover{
      box-shadow: 0 0 20px #163b31;
      animation:rotate 1.2s cubic-bezier(.66,-0.47,.33,1.5) forwards;
    }
    .front,
    .back{
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      display: flex;
      flex-direction: column;
      justify-content: space-evenly;
      align-items: center;
      font-size: 28px;
      font-weight: 600;
      border-radius: 20px;
      background-color: #043b2f;
      color: white;
    }
    .back{
      transform: rotateY(180deg) translateZ(1px);
    }
  }
}

@keyframes rotate {
  0%{
    transform: rotateY(0);
  }
  100%{
    transform: rotateY(180deg);
  }
}
@keyframes rotate-reverse {
  0%{
    transform: rotateY(180deg);
  }
  100%{
    transform: rotateY(0);
  }
}
